package br.ufmg.dcc.simulesspl.states;

import br.ufmg.dcc.simulesspl.exception.InvalidSelectionException;
import br.ufmg.dcc.simulesspl.fsm.AbstractState;
import br.ufmg.dcc.simulesspl.view.EngineerSelectionView;

public class EngineerSelectionState extends AbstractState {

	public void run() {
		EngineerSelectionView view = new EngineerSelectionView();

		view.showEngineers();
		
		while(true) {
			try{
				view.chooseEngineers();
				break;
			} catch(InvalidSelectionException e) {
				view.showInvalidEngineerMessage();
			}
		}
	}
}
